Integrand size = 21, antiderivative size = 136 \[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}+\frac {\sqrt {2} b n \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},1-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{(a+b) d \sqrt {1+\sec (c+d x)}} \]
-cot(d*x+c)*(a+b*sec(d*x+c))^n/d+b*n*AppellF1(1/2,1-n,1/2,3/2,b*(1-sec(d*x +c))/(a+b),1/2-1/2*sec(d*x+c))*(a+b*sec(d*x+c))^n*2^(1/2)*tan(d*x+c)/(a+b) /d/(((a+b*sec(d*x+c))/(a+b))^n)/(1+sec(d*x+c))^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(3614\) vs. \(2(136)=272\).
Time = 17.33 (sec) , antiderivative size = 3614, normalized size of antiderivative = 26.57 \[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\text {Result too large to show} \]
((b + a*Cos[c + d*x])^n*Cot[(c + d*x)/2]*Csc[c + d*x]^2*Sec[c + d*x]^n*(a + b*Sec[c + d*x])^n*(-((AppellF1[-1/2, n, -n, 1/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)]*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n)/(( (b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/(a + b))^n) + (3*(a + b)*AppellF1 [1/2, n, -n, 3/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b) ]*Tan[(c + d*x)/2]^2)/(3*(a + b)*AppellF1[1/2, n, -n, 3/2, Tan[(c + d*x)/2 ]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)] + 2*n*((-a + b)*AppellF1[3/2, n , 1 - n, 5/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)] + (a + b)*AppellF1[3/2, 1 + n, -n, 5/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)])*Tan[(c + d*x)/2]^2)))/(2*d*(-1/4*((b + a*Cos[c + d* x])^n*Csc[(c + d*x)/2]^2*Sec[c + d*x]^n*(-((AppellF1[-1/2, n, -n, 1/2, Tan [(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)]*(Cos[c + d*x]*Sec[( c + d*x)/2]^2)^n)/(((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/(a + b))^n) + (3*(a + b)*AppellF1[1/2, n, -n, 3/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)]*Tan[(c + d*x)/2]^2)/(3*(a + b)*AppellF1[1/2, n, -n, 3/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)] + 2*n*((-a + b)*AppellF1[3/2, n, 1 - n, 5/2, Tan[(c + d*x)/2]^2, ((a - b)*Tan[(c + d* x)/2]^2)/(a + b)] + (a + b)*AppellF1[3/2, 1 + n, -n, 5/2, Tan[(c + d*x)/2] ^2, ((a - b)*Tan[(c + d*x)/2]^2)/(a + b)])*Tan[(c + d*x)/2]^2))) - (a*n*(b + a*Cos[c + d*x])^(-1 + n)*Cot[(c + d*x)/2]*Sec[c + d*x]^n*Sin[c + d*x...
Time = 0.43 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4363, 25, 3042, 4321, 156, 155}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a-b \csc \left (c+d x-\frac {\pi }{2}\right )\right )^n}{\cos \left (c+d x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4363 |
\(\displaystyle -b n \int -\sec (c+d x) (a+b \sec (c+d x))^{n-1}dx-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle b n \int \sec (c+d x) (a+b \sec (c+d x))^{n-1}dx-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle b n \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n-1}dx-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
\(\Big \downarrow \) 4321 |
\(\displaystyle -\frac {b n \tan (c+d x) \int \frac {(a+b \sec (c+d x))^{n-1}}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
\(\Big \downarrow \) 156 |
\(\displaystyle -\frac {b n \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \int \frac {\left (\frac {a}{a+b}+\frac {b \sec (c+d x)}{a+b}\right )^{n-1}}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{d (a+b) \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
\(\Big \downarrow \) 155 |
\(\displaystyle \frac {\sqrt {2} b n \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},1-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{d (a+b) \sqrt {\sec (c+d x)+1}}-\frac {\cot (c+d x) (a+b \sec (c+d x))^n}{d}\) |
-((Cot[c + d*x]*(a + b*Sec[c + d*x])^n)/d) + (Sqrt[2]*b*n*AppellF1[1/2, 1/ 2, 1 - n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^n*Tan[c + d*x])/((a + b)*d*Sqrt[1 + Sec[c + d*x]]*((a + b* Sec[c + d*x])/(a + b))^n)
3.3.75.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ (b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] && GtQ[Sim plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] && !(GtQ[Simpl ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d *x, a + b*x]) && !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c - e*d)], 0] && SimplerQ[e + f*x, a + b*x])
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p ]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p]) Int[(a + b*x)^m*(c + d*x)^n*Si mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] & & GtQ[Simplify[b/(b*c - a*d)], 0] && !GtQ[Simplify[b/(b*e - a*f)], 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_ Symbol] :> Simp[Cot[e + f*x]/(f*Sqrt[1 + Csc[e + f*x]]*Sqrt[1 - Csc[e + f*x ]]) Subst[Int[(a + b*x)^m/(Sqrt[1 + x]*Sqrt[1 - x]), x], x, Csc[e + f*x]] , x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b^2, 0] && !IntegerQ[2*m]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)/cos[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[Tan[e + f*x]*((a + b*Csc[e + f*x])^m/f), x] + Simp[b*m Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, m}, x]
\[\int \csc \left (d x +c \right )^{2} \left (a +b \sec \left (d x +c \right )\right )^{n}d x\]
\[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
\[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \csc ^{2}{\left (c + d x \right )}\, dx \]
\[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
\[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
Timed out. \[ \int \csc ^2(c+d x) (a+b \sec (c+d x))^n \, dx=\int \frac {{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^2} \,d x \]